﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Thread1
{
    class Program
    {
        #region 阻隔线程or非阻隔线程
        static void func1()
        {
            //一秒
            for (int i = 0; i < 100; i++)
            {
                Thread.Sleep(10);
            }

        }
        static void func2()
        {
            //100秒
            for (int i = 0; i < 100; i++)
            {
                //一秒
                for (int j = 0; j < 100; j++)
                {
                    Thread.Sleep(10);
                }
            }

        }
        static void Main(string[] args)
        {
            //非阻隔线程
            func1();
            Console.WriteLine("func1 over");
            //阻隔线程
            func2();
            Console.WriteLine("func2 over");
        }
        #endregion

    }
}
